﻿using System.Linq;

namespace MartinRL.ProjectEuler
{
    /// <summary>
    /// http://projecteuler.net/index.php?section=problems&id=1
    /// </summary>
    public static class Problem001
    {
        public static int FindTheSumOfAllTheMultiplesOf3Or5Below1000()
        {
           return Enumerable.Range(0, 1000)
                  .Where(i => i.IsEvenlyDivisibleBy(3) 
                           || i.IsEvenlyDivisibleBy(5))
                  .Sum();
        }
    }
}
